<!DOCTYPE html>
<html>

  <head>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Backbone Demo: Todos</title>
    <link href="todos.css" media="all" rel="stylesheet" type="text/css"/>
    <script src="../../jq.mobi.js"></script>
    <script src="../../plugins/jq.css3animate.js"></script>
    <script src="../../plugins/jq.fx.js"></script>
   <script src="underscore.js"></script>
    <script src="backbone.js"></script>
    <script src="backbone-localstorage.js"></script>
    <script src="todos.js"></script>
  </head>

  <body>

    <!-- Todo App Interface -->

    <div id="todoapp">

      <div class="title">
        <h1>Todos</h1>
      </div>

      <div class="content">

        <div id="create-todo">
          <input id="new-todo" placeholder="What needs to be done?" type="text" />
          <span class="ui-tooltip-top" style="display:none;position:absolute;top:50px">Click Save to save or Cancel to cancel</span>
          <button type="button" id="new-todo-save" value="Save" style="width:50%;float:left">Save</button> <button style="width:50%;float:left" type="button" id="new-todo-cancel" value="Cancel">Cancel</button>
          
        </div>

        <div id="todos">
          <ul id="todo-list"></ul>
        </div>

        <div id="todo-stats"></div>

      </div>

    </div>

    <div id="credits">
      Created by
      <br />
      <a href="http://jgn.me/">J&eacute;r&ocirc;me Gravel-Niquet</a> - modified for jqMobi
    </div>

    <!-- Templates -->

    <script type="text/template" id="item-template">
      <div class="todo <%= done ? 'done' : '' %>">
        <div class="display">
          <input class="check" type="checkbox" <%= done ? 'checked="checked"' : '' %> />
          <div class="todo-text"></div>
          <span class="todo-destroy"></span>
        </div>
        <div class="edit">
          <input class="todo-input" type="text" value="" />
          <span class="todo-edit"></span>
        </div>
      </div>
    </script>

    <script type="text/template" id="stats-template">
      <% if (total) { %>
        <span class="todo-count">
          <span class="number"><%= remaining %></span>
          <span class="word"><%= remaining == 1 ? 'item' : 'items' %></span> left.
        </span>
      <% } %>
      <% if (done) { %>
        <span class="todo-clear">
          <a href="#">
            Clear <span class="number-done"><%= done %></span>
            completed <span class="word-done"><%= done == 1 ? 'item' : 'items' %></span>
          </a>
        </span>
      <% } %>
    </script>

  </body>

</html>
